#include <cstdio>
#include <iostream>
#include <FlexLexer.h>
#include "conffile.h"

using namespace std;

int main (int argc, char **argv)
{
	ConfFile inifile("test.ini");

	std::cout << "-- sample_int : " << inifile.getInt("INTS","sample_int") << std::endl;
	std::cout << "-- sample_neg : " << inifile.getInt("INTS","sample_neg") << std::endl;
	std::cout << "-- sample_float: " << inifile.getFloat("FLOATS","sample_float") << std::endl;
    
    vector<int> l = inifile.getIntList("INTS","sample_ilist");
    vector<float> lf = inifile.getFloatList("FLOATS","sample_list");
    string str;
    str = inifile.getString("EXAMPLE","my_string");

    cout << "-- sample_boolean : " << (inifile.getBoolean("EXAMPLE","my_bool"))?"TRUE":"FALSE" << endl;
    
    cout << "-- sample_string : " << str << endl;
    
    cout << "-- sample_ilist: ";
    
    for(int i = 0; i < l.size(); i++)
        cout << " " << l[i];

    cout << endl;

    cout << "-- sample_flist: ";
    
    for(int i = 0; i < lf.size(); i++)
        cout << " " << lf[i];

    cout << endl;

    return 0;
}
/* ex: set cindent expandtab softtabstop=4 shiftwidth=4 tabstop=4: */
